package com.wuwei.controller;

import com.wuwei.pojo.CommonResult;
import com.wuwei.pojo.Payment;
import com.wuwei.service.PaymentFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: OrderFeignController <br>
 * @date: 2021/2/8 21:44 <br>
 * @author: wuwei666 <br>
 * @version: 1.0 <br>
 */
@RestController
@Slf4j
public class OrderFeignController {
    @Autowired
    private PaymentFeignService paymentFeignService;

    @GetMapping("/comsumer/payment/get/{id}")
    public CommonResult<Payment> orderFeign(@PathVariable("id") Long id){
        return paymentFeignService.getPaymentById(id);
    }
}
